<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改21.错误日志')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-errorLog-edit" th:object="${sysErrorLog}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">错误编码：</label>
                <div class="col-sm-8">
                    <input name="errorCode" th:field="*{errorCode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">错误内容：</label>
                <div class="col-sm-8">
                    <textarea name="errorMessage" class="form-control">[[*{errorMessage}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">钉钉告警次数：</label>
                <div class="col-sm-8">
                    <input name="dingTimes" th:field="*{dingTimes}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">阅读状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_errorlog_readstatus')}">
                        <input type="radio" th:id="${'readStatus_' + dict.dictCode}" name="readStatus" th:value="${dict.dictValue}" th:field="*{readStatus}">
                        <label th:for="${'readStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">异常服务器IP：</label>
                <div class="col-sm-8">
                    <input name="serverIp" th:field="*{serverIp}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">异常服务器服务ID：</label>
                <div class="col-sm-8">
                    <input name="serviceId" th:field="*{serviceId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/errorLog";
        $("#form-errorLog-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-errorLog-edit').serialize());
            }
        }
    </script>
</body>
</html>